﻿#include<iostream>
#include<fstream>
#include <io.h>
#include<algorithm>
#include <cmath>
#include "AVLTree.h"
using namespace std;
int main() {
	string choose;
	AVLTree t;
	while (1) {
		t.StartShow();
		cout << "请选择：";
		cin >> choose;
		if (choose[0] == '1') {
			t.FindWord();
		}
		else if (choose[0] == '2') {
			t.Second_Insert();
		}
		else if (choose[0] == '3') {
			t.DeleteWord();
		}
		else if (choose[0] == '4') {
			t.InOrder();
			system("pause");
		}
		else if (choose[0] == '5') {
			cout << "欢迎您下次使用~" << endl;
			break;
		}
		else {
			cout << "请正确输入您的操作哦~" << endl;
			system("pause");
		}
	}

	//	AVLTree t;
	//	t.FindWord();
	//	t.Second_Insert();
	//	t.InOrder();
	//	t.DeleteWord();
	//	t.InOrder();
	//	t.FindWord();
	return 0;
}